FmsGeneralGroup Methods
The FmsGeneralGroup object contains the following methods:
GetNodeProperties
Retrieves the properties of the Node with the specified ID.
Syntax
GetNodeProperties(NodeId As Integer, BeginActive As Variant, EndActive As Variant) As Boolean
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
|
NodeId |
Integer |
Yes |
The ID of the Node for which to retrieve properties. |
|
BeginActive |
Date |
Yes |
The beginning active date of the Node. This parameter is a return variable of the method. |
|
EndActive |
Date |
Yes |
The ending active date of the Node. This parameter is a return variable of the method. |
Remarks
Return Value: False if a Node with the specified ID does not exist in the group, otherwise True.
Example
The following example sets a Node in a newly-created group and displays the Node’s properties in a series of message boxes.
Sub
Dim FmsGroup
Set FmsGroup = CreateObject("CxFms.FmsGeneralGroup")
FmsGroup.SetNode CDate("May 12, 2023"), 0, 5
Dim vBeginActiveDate, vEndActiveDate
FmsGroup.GetNodeProperties 5, vBeginActiveDate, vEndActiveDate
vBeginActiveDate = CDate(vBeginActiveDate)
vEndActiveDate = CDate(vEndActiveDate)
MsgBox vBeginActiveDate
MsgBox vEndActiveDate
End Sub
RemoveNode
Removes the Node with the specified ID.
Syntax
RemoveNode(BeginActive As Date, EndActive As Date, NodeId As Long)
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
|
BeginActive |
Date |
Yes |
The beginning active date of the Node. This parameter is a return variable of the method. |
|
EndActive |
Date |
Yes |
The ending active date of the Node. This parameter is a return variable of the method. |
|
NodeId |
Long |
Yes |
The ID of the Node for which to retrieve properties. |
SetNode
Adds the Node with the specified ID to the group.
Syntax
SetNode(BeginActive As Date, EndActive As Date, NodeId As Long)
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
|
BeginActive |
Date |
Yes |
The beginning date for which the Node will be active in the group. |
|
EndActive |
Date |
Yes |
The ending date for which the Node will be active in the group. |
|
NodeId |
Long |
Yes |
The ID of the Node to add to the group. |
Remarks
This method will fail if a Node with the specified ID does not exist in the FMS.
If the specified Node has already been added to the group, it will be removed and then added again with the current parameters.
Example
The following example creates a general group containing a single Node.
Sub
Dim FmsGeneralGroup
Set FmsGeneralGroup = CreateObject("CxFms.FmsGeneralGroup")
FmsGeneralGroup.BeginActiveDate = CDate("May 10, 2023")
FmsGeneralGroup.EndActiveDate = 0 'Indefinite end time
FmsGeneralGroup.Name = "New_General_Group"
FmsGeneralGroup.Description = "My new general group"
FmsGeneralGroup.SetNode CDate("May 10, 2023"), 0, 5
FmsClient.CreateGeneralGroup(FmsGeneralGroup)
End Sub
UpdateNode
Updates the Node with the specified ID in the group.
Syntax
UpdateNode(NodeId As Long, BeginActive As Date, bUpdateBeginActive As Long, EndActive As Date, bUpdateEndActive As Long)
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
|
NodeId |
Long |
Yes |
The ID of the Node to add to the group. |
|
BeginActive |
Date |
Yes |
The beginning date for which the Node will be active in the group. |
|
bUpdateBeginActive |
Long |
Yes |
|
|
EndActive |
Date |
Yes |
The ending date for which the Node will be active in the group. |
|
bUpdateEndActive |
Long |
Yes |


